package cn.fanxin.enums;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: china-fanxin
 * @Website: https://fan-xin.cn
 * @Description: 需要检测大小写的配置表列名枚举
 * @Date: 2022/11/27 17:49
 * @Param:
 * @return:
 */
public enum CheckColEnum {

    /**
     * @Author: china-fanxin
     * @Website: https://fan-xin.cn
     * @Description: 当前类型时间的最初
     * @Date: 2022/11/24 14:47
     */
    KPI_CODE("KPI_CODE"),
    COMP_KPI_DATA_TYPE("COMP_KPI_DATA_TYPE"),
    SRC_DATE_CYCLE_COL("SRC_DATE_CYCLE_COL"),
    SRC_PROV_COL("SRC_PROV_COL"),
    SRC_AREA_COL("SRC_AREA_COL"),
    DST_ENTITY_OWNER("DST_ENTITY_OWNER"),
    DST_ENTITY_NAME("DST_ENTITY_NAME"),
    SRC_ENTITY_OWNER("SRC_ENTITY_OWNER"),
    SRC_ENTITY_NAME("SRC_ENTITY_NAME"),
    COMP_KPI_TYPE("COMP_KPI_TYPE"),
    KPI_BATCH("KPI_BATCH"),
    IS_VALID("IS_VALID"),
    IS_SUM("IS_SUM"),
//    SRC_VALUE_COL("SRC_VALUE_COL"),
    IS_AREA_SUM("IS_AREA_SUM"),
    UNIT_DESC("UNIT_DESC"),
    EDITOR("EDITOR"),
    CHANGE_TIME("CHANGE_TIME"),
    KPI_OWNER("KPI_OWNER"),
    IS_SUPPORT_SUPER("IS_SUPPORT_SUPER"),
    ;

    CheckColEnum(String value){
        this.value = value;
    }

    private String value;


    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    /**
     * @Author: china-fanxin
     * @Website: https://fan-xin.cn
     * @Description: 获取所有需要检查的配置列列表
     * @Date: 2022/11/27 17:55
     * @Param: []
     * @return: java.util.List<java.lang.String>
     */
    public static List<String> toList(){
        List<String> list = new ArrayList<>();
        for (CheckColEnum value:CheckColEnum.values()){
            list.add(value.value);
        }
        return list;
    }

    /**
     * @Author: china-fanxin
     * @Website: https://fan-xin.cn
     * @Description: 枚举值转为逗号分隔的字符串
     * @Date: 2022/11/24 15:10
     * @Param: []
     * @return: java.lang.String
     */
    public static String toDefString() {
        String res ="";
        for (CheckColEnum value: CheckColEnum.values()){
            res = res +value.getValue()+",";
        }
        res = res.substring(0,res.length()-1);
        return res;
    }
}
